﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using SGRapidForm.Permission.Entity;
using SGRapidForm.Common;

namespace SGRapidForm.Permission.Service.Interface
{
    [ServiceContract(Namespace = "http://www.solutiongear.net/SGRapidForm/")]
    public interface IUserRole
    {
        [OperationContract]
        [FaultContract(typeof(ServiceExceptionDetail))]
        bool UserRole_Add(UserRole userRole);

        [OperationContract]
        [FaultContract(typeof(ServiceExceptionDetail))]
        bool UserRole_BulkAdd(List<UserRole> userRoles);

        [OperationContract]
        [FaultContract(typeof(ServiceExceptionDetail))]
        bool UserRole_Delete(string userKeyid, string roleKeyid);

        [OperationContract]
        [FaultContract(typeof(ServiceExceptionDetail))]
        bool UserRole_BulkDelete(string userKeyid, string[] roleKeyids);

        [OperationContract]
        [FaultContract(typeof(ServiceExceptionDetail))]
        bool UserRole_Exists(string userKeyid, string roleKeyid);

        [OperationContract]
        [FaultContract(typeof(ServiceExceptionDetail))]
        List<Role> UserRole_GetRoleByUserKeyid(string userKeyid);

        [OperationContract]
        [FaultContract(typeof(ServiceExceptionDetail))]
        List<Role> UserRole_GetUnmappedRoleByUserKeyid(string userKeyid, string filterConditions);
        [OperationContract]
        [FaultContract(typeof(ServiceExceptionDetail))]
        List<UserRole> UserRole_GetByUserKeyid();
    }
}
